<template>
  <van-cell-group @click="jump('/regulations-details',list.id, kwds)">
    <van-cell>
      <template #title>
        <span class="custom-title" v-html="list.policyName"/>
      </template>
    </van-cell>
    <div class="custom-label">
      <span>政策目录：{{ list.policyType | ellipsis(12) }}</span>
    </div>
  </van-cell-group>
</template>

<script>

export default {
  name: 'ListItem',
  props: {
    list: {
      type: Object,
      require: true,
      default: function() {
        return {}
      }
    },
    kwds: {
      type: String,
      require: true,
      default: ''
    }
  },
  methods: {
    jump(path, id, kwds) {
      this.$router.push({ path, query: { id, kwds }})
    }
  }
}
</script>

<style scoped lang="less" rel="stylesheet/less">
.custom-label {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  padding: 0 16px;

  span {
    width: 150px;
    color: #969799;
    font-size: 12px;
    padding: 10px 0;
    box-sizing: border-box;
  }
}
</style>
